import request from '@/utils/request';

// 获取图文,小说,推广等预览功能
export function getArticlePreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/article/preview',
    method: 'get',
    params: query
  });
}

// 获取推广预览
export function getAdvertisementPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/advertisement/preview',
    method: 'get',
    params: query
  });
}

// 获取图集预览
export function getGalleryPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/gallery/preview',
    method: 'get',
    params: query
  });
}

// 获取视频预览
export function getVideoPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/video/preview',
    method: 'get',
    params: query
  });
}
// 获取小视频预览
export function getSmallVideoPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/small_video/preview',
    method: 'get',
    params: query
  });
}

/* 微头条 预览*/
export function dynamicsPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/dynamics/detail',
    method: 'get',
    params: query
  });
}

// 定制资讯预览 getCustomPreview
export function getCustomPreview(query) {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/customized/preview',
    method: 'get',
    data: query
  });
}

// 获取所有的标签 getALLTags
export function getALLTags() {
  return request({
    baseURL: process.env.NEWS_API,
    url: '/news/tag/getContentTagTree',
    method: 'get'
  });
}